package me.zhengjie.tools.service

import jakarta.servlet.http.HttpServletResponse
import me.zhengjie.common.utils.PageResult
import me.zhengjie.tools.domain.LocalStorage
import me.zhengjie.tools.service.dto.LocalStorageDTO
import me.zhengjie.tools.service.dto.LocalStorageQueryCriteria
import org.springframework.data.domain.Pageable
import org.springframework.web.multipart.MultipartFile
import java.io.IOException

/**
 * @author Kuki Wu
 * @date 2019-09-05
 */
interface LocalStorageService {
    fun queryAll(criteria: LocalStorageQueryCriteria?, pageable: Pageable?): PageResult<LocalStorageDTO?>?
    fun queryAll(criteria: LocalStorageQueryCriteria): List<LocalStorageDTO?>?
    fun findById(id: Long): LocalStorageDTO?
    fun create(name: String?, file: MultipartFile): LocalStorageDTO?
    fun update(resources: LocalStorage)
    fun delete(id: Long)
    fun deleteAll(ids: Array<Long>)

    @Throws(IOException::class)
    fun download(queryAll: List<LocalStorageDTO?>?, response: HttpServletResponse?)
}